<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html>
<html>
<head>

    <jsp:include page="/WEB-INF/jsp/include/head.jsp"/>
</head>
<body>

<ol class="breadcrumb">
    <li><strong>当前位置： </strong>评价管理</li>
    <li class="active">专家互评</li>
</ol>


<table id="table_data"></table>

<div class="modal fade" id="modal_ajax">
    <div class="modal-dialog  modal-lg ">
        <div class="modal-content ">
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->


<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>


<script>

    var $table_data = $('#table_data');

    $table_data.bootstrapTable({
        url: 'business/inspectorAssess/select',
        striped: true,
        cache: false,
        sidePagination: 'client',
        searchOnEnterKey: false,
        pageSize: 10,
        pageList: [ 10, 20,50],
        pageNumber: 1,
        pagination: true,
        queryParams: function (params) {
            $.extend(params, $("#form_search").serializeObject());
            return params
        },
        columns: [
            {
                formatter: function (value, row, index) {
                    return [index + 1].join('');
                }
            },
            {
                field: 'businessCode',
                title: '核查计划编号'
            },
            {
                field: 'companyName',
                title: '企业名称'

            },
            {
                field: 'productName',
                title: '产品名称'

            },
            {
                field: 'endTime',
                title: '核查日期',
                formatter: function (value, row, index) {
                    return $.Helper.dataTimeHelper.int2DateString(value);
                }
            },
            {
                title: '操作',
                events: 'events',
                formatter: function (value, row, index) {
                        return [
                            '<button type="button"  class="btn btn-xs btn-default  btn-warning addReport">' +
                            '<span class="glyphicon glyphicon-edit"></span>&nbsp;填写</button>'
                        ].join('');
                }
            }

        ]
    });

    window.events = {
        'click .addReport': function (e, value, row, index) {

            $('#modal_ajax').modal({
                backdrop: 'static',
                keyboard: false,
                show: true,
                remote: 'business/inspectorAssess/editDlg?businessId=' + row.id
            });
        }
    };



    $(function(){
        $.sysPlugin.clearModalRemoveData("modal_ajax");
        $.sysPlugin.initDateTimeInput();
        $.sysPlugin.initSimpleSelect2();
    });

</script>




</body>
</html>